package com.java.tools.mouse.e1;

import java.util.Random;

/**
 * @author wangning
 * @create 2022-03-18 17:07
 */
public class RandomNumberTest {
	public static void main(String[] args) {
		// 第一种方法返回的数值是[0.0,1.0）的double型数值
		double random = Math.random() * 5 - 3;
		System.out.println("random = " + random);
		// 第二种
		Random random1 = new Random();
//		double v = random1.nextDouble();
		int num = new Random().nextInt(5) * 1000;
		System.out.println("num = " + num);

	}
}
